home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / HENSA / MATHS / PLPLOT / PLPLOT.ZIP / sys / dos / msc / makefile < prev    next >
Encoding:
Makefile  |  1994-05-27  |  6.1 KB  |  292 lines

  1. #
  2. # Makefile for PLPLOT
  3. #
  4. # This makefile is intended to be used with Microsft NMAKE, as supplied with
  5. # MS C 6.0 Professional Development System (it's not actually very expensive).
  6. # It is currently set up to be run in an OS/2 session, and will build the
  7. # PLPLOT system of libraries, utilities and examples for execution under either
  8. # OS/2 native mode or under DOS (and the OS/2 DOS box).
  9. #
  10. # To build the DOS version, you will need to modify the makefile in a couple
  11. # of places, in order to include the MSCVGA driver.  These changes are marked
  12. # in the makefile with comments starting with "# DOS".
  13. #
  14. # Questions or problems, send (e)mail to:
  15. #       <insert supporter's name here>
  16.  
  17. PLDIR    = c:\plplot\
  18. PLFNT_DIR=c:\etc\
  19. PLLIBDIR = .
  20. FONTFLAG= "-DPLFONTDEV1=\"c:\\etc\\ \""
  21.  
  22. CC    = cl
  23. F77    = fl
  24. # CFLAGS    = /FPi87  /nologo /Od /Zi /AL
  25. # FFLAGS    = /FPi87  /nologo /Od /Zi /AL
  26. #
  27. # CFLAGS    = /FPi87  /nologo /Ox /G2 /AL
  28. # FFLAGS    = /FPi87  /nologo /Ox /G2 /AL
  29.  
  30. CFLAGS    = /FPi87  /nologo /Ox /G2 /AL /Za /W4
  31. FFLAGS    = /FPi87  /nologo /Ox /G2 /AL
  32.  
  33. # OS/2    Enable -DOS2PM if you have purchassed this add-on driver.
  34. #    Also, you'll need to enable it in the driver list below...
  35. # PLDEVICES    = -DPS -DLJII -DPLMETA -DHP7470 -DIMP -DOS2PM -DNULLDEV
  36.  
  37. # DOS
  38. # PLDEVICES    = -DPS -DLJII -DPLMETA -DHP7470 -DIMP -DVGA -DNULLDEV
  39. # PLDEVICES = -DLJII -DPLMETA -DHP7470 -DVGA -DNULLDEV
  40. #
  41. # define a minimum set of drivers
  42. PLDEVICES =  -DPLMETA -DHP7470 -DHP7580 -DVGA
  43.  
  44. # Rules
  45. .SUFFIXES:
  46. .SUFFIXES: .o .c .for .exe
  47.  
  48. .c.o:
  49.     $(CC) -c $(CFLAGS) -DMSDOS $(PLDEVICES) /Fo$*.o $*.c
  50.  
  51. .c.exe:
  52.     $(CC) $(CFLAGS) -DMSDOS $*.c -link graphics.lib plplot.lib
  53.  
  54. .for.o:
  55.     $(F77) -c $(FFLAGS) /Fo$*.o $*.for
  56.  
  57. ##############################################################################
  58. #
  59. # Dependencies for plplot package.
  60. #
  61. ##############################################################################
  62.  
  63. # Object file macros
  64. # Main sources.
  65.  
  66. OBJ =    \
  67.     pdfutils.o \
  68.     plargs.o \
  69.     plbox.o \
  70.     plcont.o \
  71.     plcore.o \
  72.     plctest.o \
  73.     plctrl.o \
  74.     plcvt.o \
  75.     pldtik.o \
  76.     plfill.o \
  77.     plfont.o \
  78.     plhist.o \
  79.     plline.o \
  80.     plot3d.o \
  81.     plpage.o \
  82.     plsdef.o \
  83.     plshade.o \
  84.     plstream.o \
  85.     plstring.o \
  86.     plsym.o \
  87.     pltick.o \
  88.     plvpor.o \
  89.     plwind.o
  90.  
  91. # Support files for font generators.
  92.  
  93. FONT_OBJ = \
  94.     font01.o \
  95.     font02.o \
  96.     font03.o \
  97.     font04.o \
  98.     font05.o \
  99.     font06.o \
  100.     font07.o \
  101.     font08.o \
  102.     font09.o \
  103.     font10.o \
  104.     font11.o
  105.  
  106. # C & Fortran stubs for linking Plplot to Fortran.
  107.  
  108. CSTUB_OBJ = \
  109.     sc3d.o \
  110.     sccont.o \
  111.     scstubs.o
  112.  
  113. FSTUB_OBJ = \
  114.     strutil.o \
  115.     sfstubs.o
  116.  
  117.  
  118. # DOS *or* OS/2         comment/uncomment of the next two declarations
  119.  
  120. # DOS
  121. OS2_OBJ = mscvga.o
  122.  
  123. # OS/2
  124. # OS2_OBJ = os2pm.o
  125.  
  126. # Drivers
  127.  
  128. DRIVERS_OBJ = \
  129.     dg300.o \
  130.     hpgl.o \
  131.     impress.o \
  132.     ljii.o \
  133.     null.o \
  134.     plbuf.o \
  135.     plmeta.o \
  136.     ps.o
  137.  
  138. #################
  139.  
  140. # Library dependencies
  141.  
  142. libs:    libc libf
  143. libc:    $(PLLIBDIR)\plplot.lib
  144. libf:    $(PLLIBDIR)\plstub.lib
  145.  
  146. $(PLLIBDIR)\plplot.lib:    $(OBJ) $(DRIVERS_OBJ) $(OS2_OBJ)
  147.     @echo Ready to build plplot.lib
  148.     -@del plplot.lib
  149.     lib @<<
  150. plplot
  151. y
  152. + $(OBJ:.o =.o &
  153. +) &
  154. + $(DRIVERS_OBJ:.o =.o &
  155. +) &
  156. + $(OS2_OBJ:.o =.o &
  157. +) ;
  158. <<
  159.  
  160. $(PLLIBDIR)\plstub.lib:    $(CSTUB_OBJ)
  161.     @echo Ready to build plstub.lib
  162.     -@del plstub.lib
  163.     lib @<<
  164. plstub
  165. y
  166. + $(CSTUB_OBJ:.o =.o &
  167. +) ;
  168. <<
  169.  
  170. # $(PLLIBDIR)\plstub.lib:    $(CSTUB_OBJ) $(FSTUB_OBJ)
  171. #     @echo Ready to build plstub.lib
  172. #     -@del plstub.lib
  173. #     lib @<<
  174. # plstub
  175. # y
  176. # + $(CSTUB_OBJ:.o =.o &
  177. # +) &
  178. # + $(FSTUB_OBJ:.o =.o &
  179. # +) ;
  180. # <<
  181.  
  182. # In case you REALLY mean it!
  183.  
  184. force: links libs
  185.  
  186. # First time only, should be executed from $(PLDIR)tmp\
  187.  
  188. links: linkmain linkstubs
  189.  
  190. linkmain:
  191.     copy ..\src\*.c .
  192.     copy ..\include\*.h .
  193.     copy ..\examples\c\*.c .
  194.     copy ..\examples\f77\*.f .
  195.     copy ..\drivers\*.* .
  196.     copy ..\fonts\*.* .
  197.     copy ..\utils\*.* .
  198.     copy ..\sys\dos\msc\*.c .
  199.     ren *.f *.for
  200.  
  201. linkstubs:    
  202.     copy ..\sys\os2\stubf\*.* .
  203.     copy ..\src\stubc\*.* .
  204.     ren *.f *.for
  205.  
  206. # The metafile renderer.
  207.  
  208. plrender: plrender.exe
  209.  
  210. #     $(CC) $(CFLAGS) plrender.c plplot.lib
  211. #     cl $(CFLAGS) plrender.c getopt.c plplot.lib
  212.  
  213. #----------------------------------------------------------------------#
  214. # Font files.
  215. # Note 6 font files actually created.
  216. # sfont - standard font
  217. # xfont - extended fonts
  218.  
  219. fonts:    sfont xfont
  220.     copy *.fnt $(PLFNT_DIR)
  221.  
  222. sfont:    $(PLFNT_DIR)plstnd.fnt
  223. xfont:    $(PLFNT_DIR)plxtnd.fnt
  224.  
  225. $(PLFNT_DIR)plstnd.fnt:
  226.     $(CC) $(CFLAGS:AL=AH) /Gt16 stndfont.c font*.c pdfutils.c
  227.     -stndfont
  228.  
  229. $(PLFNT_DIR)plxtnd.fnt:
  230.     $(CC) $(CFLAGS:AL=AH) /Gt16 xtndfont.c font*.obj pdfutils.obj
  231.     -xtndfont
  232.  
  233. #----------------------------------------------------------------------#
  234. # Explicit rules
  235. #
  236. # plfont.c may have font flags passed in
  237.  
  238. plfont.o: plfont.c
  239.     $(CC) -c $(CFLAGS) $(FONTFLAG) $(PLDEVICES) /Fo$*.o $*.c
  240.  
  241. # dispatch.c and all the drivers need to know $(PLDEVICES).  The guts
  242. # of the driver routine are not compiled if its name is not present in
  243. # the device list.  You may want to leave drivers for specific systems
  244. # (Amiga, MS-DOS, OS/2, etc) out of this list.
  245.  
  246. #----------------------------------------------------------------------#
  247. # Build all the demos
  248.  
  249. demos : cdemos fdemos
  250.  
  251. # Example programs, in c.
  252.  
  253. heap: chkheap.exe
  254.  
  255. cdemos: x01c.exe x02c.exe x03c.exe x04c.exe\
  256.         x05c.exe x06c.exe x07c.exe x08c.exe\
  257.         x09c.exe x10c.exe x11c.exe x12c.exe\
  258.         x13c.exe x15c.exe tutor.exe
  259.  
  260. # remove x14c.exe, since dos does not have xwindows
  261.  
  262. # Example programs, in Fortran.
  263.  
  264. fdemos: x01f.exe x02f.exe x03f.exe x04f.exe x05f.exe x06f.exe x07f.exe x08f.exe x09f.exe x10f.exe x11f.exe x12f.exe x13f.exe
  265.  
  266. x01f.exe:
  267.     $(F77) $(FFLAGS) x01f.for plplot.lib plstub.lib
  268. x02f.exe:
  269.     $(F77) $(FFLAGS) x02f.for plplot.lib plstub.lib
  270. x03f.exe:
  271.     $(F77) $(FFLAGS) x03f.for plplot.lib plstub.lib
  272. x04f.exe:
  273.     $(F77) $(FFLAGS) x04f.for plplot.lib plstub.lib
  274. x05f.exe:
  275.     $(F77) $(FFLAGS) x05f.for plplot.lib plstub.lib
  276. x06f.exe:
  277.     $(F77) $(FFLAGS) x06f.for plplot.lib plstub.lib
  278. x07f.exe:
  279.     $(F77) $(FFLAGS) x07f.for plplot.lib plstub.lib
  280. x08f.exe:
  281.     $(F77) $(FFLAGS) x08f.for plplot.lib plstub.lib
  282. x09f.exe:
  283.     $(F77) $(FFLAGS) /Gt512 x09f.for plplot.lib plstub.lib
  284. x10f.exe:
  285.     $(F77) $(FFLAGS) x10f.for plplot.lib plstub.lib
  286. x11f.exe:
  287.     $(F77) $(FFLAGS) x11f.for plplot.lib plstub.lib
  288. x12f.exe:
  289.     $(F77) $(FFLAGS) x12f.for plplot.lib plstub.lib
  290. x13f.exe:
  291.     $(F77) $(FFLAGS) x13f.for plplot.lib plstub.lib
  292.